package com.wgj.android.adapter;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;

import com.baidu.mapapi.search.sug.SuggestionResult;
import com.jiaai.xui.adapter.XRecyclerViewAdapter;
import com.jiaai.xui.adapter.XViewHolder;
import com.wgj.android.R;
import com.wgj.android.entity.Address;

import java.util.List;

/**
 * Created by Administrator on 2018/5/23.
 */

public class BaiDuAddressAdapter extends XRecyclerViewAdapter<Address> {
    public BaiDuAddressAdapter(@NonNull RecyclerView mRecyclerView, List<Address> dataLists) {
        super(mRecyclerView, dataLists, R.layout.baidu_address_item);
    }


    @Override
    protected void bindData(XViewHolder xViewHolder, Address suggestionInfo, int i) {
        xViewHolder.setText(R.id.name,suggestionInfo.getName());
        xViewHolder.setText(R.id.address,suggestionInfo.getAddress());
/*
        xViewHolder.setText(R.id.name,suggestionInfo.key);
        xViewHolder.setText(R.id.address,suggestionInfo.address);
*/
    }
}
